package nc.ui.ia.bill;

import nc.bs.framework.common.NCLocator;

import nc.itf.ia.bill.IBill;
import nc.itf.ia.bill.IBillQuery;

import nc.ui.ia.pub.RemoteCall;

import nc.vo.ia.bill.BillVO;

/**
 * business service ejb wrapper Created by EJBGenerator based on velocity
 * technology
 */

public class BillBO_Client {

  private static String beanName = IBill.class.getName();

  private static String beanQueryName = IBillQuery.class.getName();

  public static void delete(nc.vo.scm.pub.session.ClientLink arg0,
      nc.vo.ia.bill.BillVO arg1, java.lang.String arg2, java.lang.String arg3,
      java.lang.String arg4) throws Exception {

    IBill bo = (IBill) NCLocator.getInstance().lookup(beanName);
    bo.delete(arg0, arg1, arg2, arg3, arg4);

  }

  public static nc.vo.ia.bill.BillVO insert(
      nc.vo.scm.pub.session.ClientLink arg0, nc.vo.ia.bill.BillVO arg1)
      throws Exception {

    IBill bo = (IBill) NCLocator.getInstance().lookup(beanName);
    nc.vo.ia.bill.BillVO o = null;
    o = bo.insert(arg0, arg1);
    return o;

  }

  public static nc.vo.ia.bill.BillVO update(
      nc.vo.scm.pub.session.ClientLink arg0, nc.vo.ia.bill.BillVO arg1,
      nc.vo.ia.bill.BillVO arg2, nc.vo.pub.lang.UFBoolean arg3,
      nc.vo.pub.lang.UFBoolean arg4, java.lang.String arg5) throws Exception {

    IBill bo = (IBill) NCLocator.getInstance().lookup(beanName);
    nc.vo.ia.bill.BillVO o = null;
    o = bo.update(arg0, arg1, arg2, arg3, arg4, arg5);
    return o;

  }

  public static nc.vo.ia.bill.BillVO[] querybillWithOtherTable(
      java.lang.String[] arg0, java.lang.String[] arg1,
      java.lang.String[] arg2, nc.vo.ia.bill.BillVO arg3,
      java.lang.String arg4, nc.vo.ia.bill.BillVO arg5, java.lang.Boolean arg6,
      nc.vo.scm.pub.session.ClientLink arg7) throws Exception {

    IBillQuery bo = (IBillQuery) NCLocator.getInstance().lookup(beanQueryName);
    nc.vo.ia.bill.BillVO[] o = null;
    o = bo.querybillWithOtherTable(arg0, arg1, arg2, arg3, arg4, arg5, arg6,
        arg7);
    return o;

  }

  public static nc.vo.ia.bill.BillVO[] queryByVO(nc.vo.ia.bill.BillVO arg0,
      java.lang.Boolean arg1, java.lang.String arg2,
      nc.vo.scm.pub.session.ClientLink arg3) throws Exception {

    IBillQuery bo = (IBillQuery) NCLocator.getInstance().lookup(beanQueryName);
    nc.vo.ia.bill.BillVO[] o = null;
    o = bo.queryByVO(arg0, arg1, arg2, arg3);
    return o;

  }

  public static java.util.HashMap queryBodyItems(java.lang.String[] arg0,
      java.lang.String arg1, nc.vo.scm.pub.session.ClientLink arg2)
      throws Exception {

    IBillQuery bo = (IBillQuery) NCLocator.getInstance().lookup(beanQueryName);
    java.util.HashMap o = null;
    o = bo.queryBodyItems(arg0, arg1, arg2);
    return o;

  }

  public static nc.vo.ia.bill.BillVO[] queryWithOtherTableHaveInv(
      java.lang.String[] arg0, java.lang.String[] arg1,
      java.lang.String[] arg2, nc.vo.ia.bill.BillVO arg3, java.lang.String arg4)
      throws Exception {

    IBillQuery bo = (IBillQuery) NCLocator.getInstance().lookup(beanQueryName);
    nc.vo.ia.bill.BillVO[] o = null;
    o = bo.queryWithOtherTableHaveInv(arg0, arg1, arg2, arg3, arg4);
    return o;

  }

  public static nc.vo.ia.bill.BillVO insertForBeginBills(
      nc.vo.scm.pub.session.ClientLink arg0, nc.vo.ia.bill.BillVO arg1)
      throws Exception {

    IBill bo = (IBill) NCLocator.getInstance().lookup(beanName);
    nc.vo.ia.bill.BillVO o = null;
    o = bo.insertForBeginBills(arg0, arg1);
    return o;

  }

  public static nc.vo.ia.bill.AddQueryVO queryAddBillVOs(
      nc.vo.ia.bill.AddQueryVO arg0) throws Exception {

    IBillQuery bo = (IBillQuery) NCLocator.getInstance().lookup(beanQueryName);
    nc.vo.ia.bill.AddQueryVO o = null;
    o = bo.queryAddBillVOs(arg0);
    return o;

  }

  public static nc.vo.ia.bill.BillVO updateForBeginBill(
      nc.vo.scm.pub.session.ClientLink arg0, nc.vo.ia.bill.BillVO arg1,
      nc.vo.ia.bill.BillVO arg2, java.lang.String arg3) throws Exception {

    IBill bo = (IBill) NCLocator.getInstance().lookup(beanName);
    nc.vo.ia.bill.BillVO o = null;
    o = bo.updateForBeginBill(arg0, arg1, arg2, arg3);
    return o;

  }

  public static BillVO[] importBills(String pk_corp, String date,
      String userID, String modulename) throws Exception {
    Object[] parameter = new Object[4];
    parameter[0] = pk_corp;
    parameter[1] = date;
    parameter[2] = userID;
    parameter[3] = modulename;

    RemoteCall remote = new RemoteCall();
    BillVO[] bills = (BillVO[]) remote.callEJBService(
        "nc.impl.ia.bill.BillImpl", "importBills", new Class[] {
            String[].class, String.class, String.class, String.class
        }, parameter);
    return bills;

  }
  
  public static nc.vo.ia.bill.BillVO[] insertArrayForBeginBills(nc.vo.scm.pub.session.ClientLink arg0 ,nc.vo.ia.bill.BillVO[] arg1 ) throws Exception{

    IBill bo = (IBill)NCLocator.getInstance().lookup(beanName);    
      nc.vo.ia.bill.BillVO[] o = null;
    o = bo.insertArrayForBeginBills(arg0 ,arg1 );         
      return o;
      
  }  
}